/*
 * MIT License
 *
 * Copyright (c) 2023 OrdinaryRoad
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: douyin.proto

// Protobuf Java Version: 3.25.3
package tech.ordinaryroad.live.chat.client.codec.douyin.protobuf;

/**
 * Protobuf type {@code SendMessageBody}
 */
public final class SendMessageBody extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:SendMessageBody)
    SendMessageBodyOrBuilder {
private static final long serialVersionUID = 0L;
  // Use SendMessageBody.newBuilder() to construct.
  private SendMessageBody(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private SendMessageBody() {
    conversationId_ = "";
    content_ = "";
    ext_ = java.util.Collections.emptyList();
    ticket_ = "";
    clientMessageId_ = "";
  }

  @Override
  @SuppressWarnings({"unused"})
  protected Object newInstance(
      UnusedPrivateParameter unused) {
    return new SendMessageBody();
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return Douyin.internal_static_SendMessageBody_descriptor;
  }

  @Override
  protected FieldAccessorTable
      internalGetFieldAccessorTable() {
    return Douyin.internal_static_SendMessageBody_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            SendMessageBody.class, Builder.class);
  }

  public static final int CONVERSATIONID_FIELD_NUMBER = 1;
  @SuppressWarnings("serial")
  private volatile Object conversationId_ = "";
  /**
   * <code>string conversationId = 1;</code>
   * @return The conversationId.
   */
  @Override
  public String getConversationId() {
    Object ref = conversationId_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      conversationId_ = s;
      return s;
    }
  }
  /**
   * <code>string conversationId = 1;</code>
   * @return The bytes for conversationId.
   */
  @Override
  public com.google.protobuf.ByteString
      getConversationIdBytes() {
    Object ref = conversationId_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      conversationId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CONVERSATIONTYPE_FIELD_NUMBER = 2;
  private int conversationType_ = 0;
  /**
   * <code>uint32 conversationType = 2;</code>
   * @return The conversationType.
   */
  @Override
  public int getConversationType() {
    return conversationType_;
  }

  public static final int CONVERSATIONSHORTID_FIELD_NUMBER = 3;
  private long conversationShortId_ = 0L;
  /**
   * <code>uint64 conversationShortId = 3;</code>
   * @return The conversationShortId.
   */
  @Override
  public long getConversationShortId() {
    return conversationShortId_;
  }

  public static final int CONTENT_FIELD_NUMBER = 4;
  @SuppressWarnings("serial")
  private volatile Object content_ = "";
  /**
   * <code>string content = 4;</code>
   * @return The content.
   */
  @Override
  public String getContent() {
    Object ref = content_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      content_ = s;
      return s;
    }
  }
  /**
   * <code>string content = 4;</code>
   * @return The bytes for content.
   */
  @Override
  public com.google.protobuf.ByteString
      getContentBytes() {
    Object ref = content_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      content_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int EXT_FIELD_NUMBER = 5;
  @SuppressWarnings("serial")
  private java.util.List<ExtList> ext_;
  /**
   * <code>repeated .ExtList ext = 5;</code>
   */
  @Override
  public java.util.List<ExtList> getExtList() {
    return ext_;
  }
  /**
   * <code>repeated .ExtList ext = 5;</code>
   */
  @Override
  public java.util.List<? extends ExtListOrBuilder>
      getExtOrBuilderList() {
    return ext_;
  }
  /**
   * <code>repeated .ExtList ext = 5;</code>
   */
  @Override
  public int getExtCount() {
    return ext_.size();
  }
  /**
   * <code>repeated .ExtList ext = 5;</code>
   */
  @Override
  public ExtList getExt(int index) {
    return ext_.get(index);
  }
  /**
   * <code>repeated .ExtList ext = 5;</code>
   */
  @Override
  public ExtListOrBuilder getExtOrBuilder(
      int index) {
    return ext_.get(index);
  }

  public static final int MESSAGETYPE_FIELD_NUMBER = 6;
  private int messageType_ = 0;
  /**
   * <code>uint32 messageType = 6;</code>
   * @return The messageType.
   */
  @Override
  public int getMessageType() {
    return messageType_;
  }

  public static final int TICKET_FIELD_NUMBER = 7;
  @SuppressWarnings("serial")
  private volatile Object ticket_ = "";
  /**
   * <code>string ticket = 7;</code>
   * @return The ticket.
   */
  @Override
  public String getTicket() {
    Object ref = ticket_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      ticket_ = s;
      return s;
    }
  }
  /**
   * <code>string ticket = 7;</code>
   * @return The bytes for ticket.
   */
  @Override
  public com.google.protobuf.ByteString
      getTicketBytes() {
    Object ref = ticket_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      ticket_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CLIENTMESSAGEID_FIELD_NUMBER = 8;
  @SuppressWarnings("serial")
  private volatile Object clientMessageId_ = "";
  /**
   * <code>string clientMessageId = 8;</code>
   * @return The clientMessageId.
   */
  @Override
  public String getClientMessageId() {
    Object ref = clientMessageId_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      clientMessageId_ = s;
      return s;
    }
  }
  /**
   * <code>string clientMessageId = 8;</code>
   * @return The bytes for clientMessageId.
   */
  @Override
  public com.google.protobuf.ByteString
      getClientMessageIdBytes() {
    Object ref = clientMessageId_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      clientMessageId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  private byte memoizedIsInitialized = -1;
  @Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(conversationId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, conversationId_);
    }
    if (conversationType_ != 0) {
      output.writeUInt32(2, conversationType_);
    }
    if (conversationShortId_ != 0L) {
      output.writeUInt64(3, conversationShortId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, content_);
    }
    for (int i = 0; i < ext_.size(); i++) {
      output.writeMessage(5, ext_.get(i));
    }
    if (messageType_ != 0) {
      output.writeUInt32(6, messageType_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ticket_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, ticket_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientMessageId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, clientMessageId_);
    }
    getUnknownFields().writeTo(output);
  }

  @Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(conversationId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, conversationId_);
    }
    if (conversationType_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeUInt32Size(2, conversationType_);
    }
    if (conversationShortId_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeUInt64Size(3, conversationShortId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, content_);
    }
    for (int i = 0; i < ext_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(5, ext_.get(i));
    }
    if (messageType_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeUInt32Size(6, messageType_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ticket_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, ticket_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientMessageId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, clientMessageId_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @Override
  public boolean equals(final Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof SendMessageBody)) {
      return super.equals(obj);
    }
    SendMessageBody other = (SendMessageBody) obj;

    if (!getConversationId()
        .equals(other.getConversationId())) return false;
    if (getConversationType()
        != other.getConversationType()) return false;
    if (getConversationShortId()
        != other.getConversationShortId()) return false;
    if (!getContent()
        .equals(other.getContent())) return false;
    if (!getExtList()
        .equals(other.getExtList())) return false;
    if (getMessageType()
        != other.getMessageType()) return false;
    if (!getTicket()
        .equals(other.getTicket())) return false;
    if (!getClientMessageId()
        .equals(other.getClientMessageId())) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + CONVERSATIONID_FIELD_NUMBER;
    hash = (53 * hash) + getConversationId().hashCode();
    hash = (37 * hash) + CONVERSATIONTYPE_FIELD_NUMBER;
    hash = (53 * hash) + getConversationType();
    hash = (37 * hash) + CONVERSATIONSHORTID_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getConversationShortId());
    hash = (37 * hash) + CONTENT_FIELD_NUMBER;
    hash = (53 * hash) + getContent().hashCode();
    if (getExtCount() > 0) {
      hash = (37 * hash) + EXT_FIELD_NUMBER;
      hash = (53 * hash) + getExtList().hashCode();
    }
    hash = (37 * hash) + MESSAGETYPE_FIELD_NUMBER;
    hash = (53 * hash) + getMessageType();
    hash = (37 * hash) + TICKET_FIELD_NUMBER;
    hash = (53 * hash) + getTicket().hashCode();
    hash = (37 * hash) + CLIENTMESSAGEID_FIELD_NUMBER;
    hash = (53 * hash) + getClientMessageId().hashCode();
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static SendMessageBody parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static SendMessageBody parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static SendMessageBody parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static SendMessageBody parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static SendMessageBody parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static SendMessageBody parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static SendMessageBody parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static SendMessageBody parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public static SendMessageBody parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static SendMessageBody parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static SendMessageBody parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static SendMessageBody parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(SendMessageBody prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @Override
  protected Builder newBuilderForType(
      BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code SendMessageBody}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:SendMessageBody)
      SendMessageBodyOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return Douyin.internal_static_SendMessageBody_descriptor;
    }

    @Override
    protected FieldAccessorTable
        internalGetFieldAccessorTable() {
      return Douyin.internal_static_SendMessageBody_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              SendMessageBody.class, Builder.class);
    }

    // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.SendMessageBody.newBuilder()
    private Builder() {

    }

    private Builder(
        BuilderParent parent) {
      super(parent);

    }
    @Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      conversationId_ = "";
      conversationType_ = 0;
      conversationShortId_ = 0L;
      content_ = "";
      if (extBuilder_ == null) {
        ext_ = java.util.Collections.emptyList();
      } else {
        ext_ = null;
        extBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000010);
      messageType_ = 0;
      ticket_ = "";
      clientMessageId_ = "";
      return this;
    }

    @Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return Douyin.internal_static_SendMessageBody_descriptor;
    }

    @Override
    public SendMessageBody getDefaultInstanceForType() {
      return SendMessageBody.getDefaultInstance();
    }

    @Override
    public SendMessageBody build() {
      SendMessageBody result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @Override
    public SendMessageBody buildPartial() {
      SendMessageBody result = new SendMessageBody(this);
      buildPartialRepeatedFields(result);
      if (bitField0_ != 0) { buildPartial0(result); }
      onBuilt();
      return result;
    }

    private void buildPartialRepeatedFields(SendMessageBody result) {
      if (extBuilder_ == null) {
        if (((bitField0_ & 0x00000010) != 0)) {
          ext_ = java.util.Collections.unmodifiableList(ext_);
          bitField0_ = (bitField0_ & ~0x00000010);
        }
        result.ext_ = ext_;
      } else {
        result.ext_ = extBuilder_.build();
      }
    }

    private void buildPartial0(SendMessageBody result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.conversationId_ = conversationId_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.conversationType_ = conversationType_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.conversationShortId_ = conversationShortId_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.content_ = content_;
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.messageType_ = messageType_;
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.ticket_ = ticket_;
      }
      if (((from_bitField0_ & 0x00000080) != 0)) {
        result.clientMessageId_ = clientMessageId_;
      }
    }

    @Override
    public Builder clone() {
      return super.clone();
    }
    @Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.setField(field, value);
    }
    @Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }
    @Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }
    @Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, Object value) {
      return super.setRepeatedField(field, index, value);
    }
    @Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.addRepeatedField(field, value);
    }
    @Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof SendMessageBody) {
        return mergeFrom((SendMessageBody)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(SendMessageBody other) {
      if (other == SendMessageBody.getDefaultInstance()) return this;
      if (!other.getConversationId().isEmpty()) {
        conversationId_ = other.conversationId_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (other.getConversationType() != 0) {
        setConversationType(other.getConversationType());
      }
      if (other.getConversationShortId() != 0L) {
        setConversationShortId(other.getConversationShortId());
      }
      if (!other.getContent().isEmpty()) {
        content_ = other.content_;
        bitField0_ |= 0x00000008;
        onChanged();
      }
      if (extBuilder_ == null) {
        if (!other.ext_.isEmpty()) {
          if (ext_.isEmpty()) {
            ext_ = other.ext_;
            bitField0_ = (bitField0_ & ~0x00000010);
          } else {
            ensureExtIsMutable();
            ext_.addAll(other.ext_);
          }
          onChanged();
        }
      } else {
        if (!other.ext_.isEmpty()) {
          if (extBuilder_.isEmpty()) {
            extBuilder_.dispose();
            extBuilder_ = null;
            ext_ = other.ext_;
            bitField0_ = (bitField0_ & ~0x00000010);
            extBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getExtFieldBuilder() : null;
          } else {
            extBuilder_.addAllMessages(other.ext_);
          }
        }
      }
      if (other.getMessageType() != 0) {
        setMessageType(other.getMessageType());
      }
      if (!other.getTicket().isEmpty()) {
        ticket_ = other.ticket_;
        bitField0_ |= 0x00000040;
        onChanged();
      }
      if (!other.getClientMessageId().isEmpty()) {
        clientMessageId_ = other.clientMessageId_;
        bitField0_ |= 0x00000080;
        onChanged();
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @Override
    public final boolean isInitialized() {
      return true;
    }

    @Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10: {
              conversationId_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000001;
              break;
            } // case 10
            case 16: {
              conversationType_ = input.readUInt32();
              bitField0_ |= 0x00000002;
              break;
            } // case 16
            case 24: {
              conversationShortId_ = input.readUInt64();
              bitField0_ |= 0x00000004;
              break;
            } // case 24
            case 34: {
              content_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000008;
              break;
            } // case 34
            case 42: {
              ExtList m =
                  input.readMessage(
                      ExtList.parser(),
                      extensionRegistry);
              if (extBuilder_ == null) {
                ensureExtIsMutable();
                ext_.add(m);
              } else {
                extBuilder_.addMessage(m);
              }
              break;
            } // case 42
            case 48: {
              messageType_ = input.readUInt32();
              bitField0_ |= 0x00000020;
              break;
            } // case 48
            case 58: {
              ticket_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000040;
              break;
            } // case 58
            case 66: {
              clientMessageId_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000080;
              break;
            } // case 66
            default: {
              if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                done = true; // was an endgroup tag
              }
              break;
            } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }
    private int bitField0_;

    private Object conversationId_ = "";
    /**
     * <code>string conversationId = 1;</code>
     * @return The conversationId.
     */
    public String getConversationId() {
      Object ref = conversationId_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        conversationId_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string conversationId = 1;</code>
     * @return The bytes for conversationId.
     */
    public com.google.protobuf.ByteString
        getConversationIdBytes() {
      Object ref = conversationId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        conversationId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string conversationId = 1;</code>
     * @param value The conversationId to set.
     * @return This builder for chaining.
     */
    public Builder setConversationId(
        String value) {
      if (value == null) { throw new NullPointerException(); }
      conversationId_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * <code>string conversationId = 1;</code>
     * @return This builder for chaining.
     */
    public Builder clearConversationId() {
      conversationId_ = getDefaultInstance().getConversationId();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     * <code>string conversationId = 1;</code>
     * @param value The bytes for conversationId to set.
     * @return This builder for chaining.
     */
    public Builder setConversationIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      conversationId_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    private int conversationType_ ;
    /**
     * <code>uint32 conversationType = 2;</code>
     * @return The conversationType.
     */
    @Override
    public int getConversationType() {
      return conversationType_;
    }
    /**
     * <code>uint32 conversationType = 2;</code>
     * @param value The conversationType to set.
     * @return This builder for chaining.
     */
    public Builder setConversationType(int value) {

      conversationType_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * <code>uint32 conversationType = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearConversationType() {
      bitField0_ = (bitField0_ & ~0x00000002);
      conversationType_ = 0;
      onChanged();
      return this;
    }

    private long conversationShortId_ ;
    /**
     * <code>uint64 conversationShortId = 3;</code>
     * @return The conversationShortId.
     */
    @Override
    public long getConversationShortId() {
      return conversationShortId_;
    }
    /**
     * <code>uint64 conversationShortId = 3;</code>
     * @param value The conversationShortId to set.
     * @return This builder for chaining.
     */
    public Builder setConversationShortId(long value) {

      conversationShortId_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     * <code>uint64 conversationShortId = 3;</code>
     * @return This builder for chaining.
     */
    public Builder clearConversationShortId() {
      bitField0_ = (bitField0_ & ~0x00000004);
      conversationShortId_ = 0L;
      onChanged();
      return this;
    }

    private Object content_ = "";
    /**
     * <code>string content = 4;</code>
     * @return The content.
     */
    public String getContent() {
      Object ref = content_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        content_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string content = 4;</code>
     * @return The bytes for content.
     */
    public com.google.protobuf.ByteString
        getContentBytes() {
      Object ref = content_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        content_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string content = 4;</code>
     * @param value The content to set.
     * @return This builder for chaining.
     */
    public Builder setContent(
        String value) {
      if (value == null) { throw new NullPointerException(); }
      content_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     * <code>string content = 4;</code>
     * @return This builder for chaining.
     */
    public Builder clearContent() {
      content_ = getDefaultInstance().getContent();
      bitField0_ = (bitField0_ & ~0x00000008);
      onChanged();
      return this;
    }
    /**
     * <code>string content = 4;</code>
     * @param value The bytes for content to set.
     * @return This builder for chaining.
     */
    public Builder setContentBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      content_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }

    private java.util.List<ExtList> ext_ =
      java.util.Collections.emptyList();
    private void ensureExtIsMutable() {
      if (!((bitField0_ & 0x00000010) != 0)) {
        ext_ = new java.util.ArrayList<ExtList>(ext_);
        bitField0_ |= 0x00000010;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        ExtList, ExtList.Builder, ExtListOrBuilder> extBuilder_;

    /**
     * <code>repeated .ExtList ext = 5;</code>
     */
    public java.util.List<ExtList> getExtList() {
      if (extBuilder_ == null) {
        return java.util.Collections.unmodifiableList(ext_);
      } else {
        return extBuilder_.getMessageList();
      }
    }
    /**
     * <code>repeated .ExtList ext = 5;</code>
     */
    public int getExtCount() {
      if (extBuilder_ == null) {
        return ext_.size();
      } else {
        return extBuilder_.getCount();
      }
    }
    /**
     * <code>repeated .ExtList ext = 5;</code>
     */
    public ExtList getExt(int index) {
      if (extBuilder_ == null) {
        return ext_.get(index);
      } else {
        return extBuilder_.getMessage(index);
      }
    }
    /**
     * <code>repeated .ExtList ext = 5;</code>
     */
    public Builder setExt(
        int index, ExtList value) {
      if (extBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureExtIsMutable();
        ext_.set(index, value);
        onChanged();
      } else {
        extBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .ExtList ext = 5;</code>
     */
    public Builder setExt(
        int index, ExtList.Builder builderForValue) {
      if (extBuilder_ == null) {
        ensureExtIsMutable();
        ext_.set(index, builderForValue.build());
        onChanged();
      } else {
        extBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .ExtList ext = 5;</code>
     */
    public Builder addExt(ExtList value) {
      if (extBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureExtIsMutable();
        ext_.add(value);
        onChanged();
      } else {
        extBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <code>repeated .ExtList ext = 5;</code>
     */
    public Builder addExt(
        int index, ExtList value) {
      if (extBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureExtIsMutable();
        ext_.add(index, value);
        onChanged();
      } else {
        extBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .ExtList ext = 5;</code>
     */
    public Builder addExt(
        ExtList.Builder builderForValue) {
      if (extBuilder_ == null) {
        ensureExtIsMutable();
        ext_.add(builderForValue.build());
        onChanged();
      } else {
        extBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .ExtList ext = 5;</code>
     */
    public Builder addExt(
        int index, ExtList.Builder builderForValue) {
      if (extBuilder_ == null) {
        ensureExtIsMutable();
        ext_.add(index, builderForValue.build());
        onChanged();
      } else {
        extBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .ExtList ext = 5;</code>
     */
    public Builder addAllExt(
        Iterable<? extends ExtList> values) {
      if (extBuilder_ == null) {
        ensureExtIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, ext_);
        onChanged();
      } else {
        extBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <code>repeated .ExtList ext = 5;</code>
     */
    public Builder clearExt() {
      if (extBuilder_ == null) {
        ext_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000010);
        onChanged();
      } else {
        extBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>repeated .ExtList ext = 5;</code>
     */
    public Builder removeExt(int index) {
      if (extBuilder_ == null) {
        ensureExtIsMutable();
        ext_.remove(index);
        onChanged();
      } else {
        extBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <code>repeated .ExtList ext = 5;</code>
     */
    public ExtList.Builder getExtBuilder(
        int index) {
      return getExtFieldBuilder().getBuilder(index);
    }
    /**
     * <code>repeated .ExtList ext = 5;</code>
     */
    public ExtListOrBuilder getExtOrBuilder(
        int index) {
      if (extBuilder_ == null) {
        return ext_.get(index);  } else {
        return extBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <code>repeated .ExtList ext = 5;</code>
     */
    public java.util.List<? extends ExtListOrBuilder>
         getExtOrBuilderList() {
      if (extBuilder_ != null) {
        return extBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(ext_);
      }
    }
    /**
     * <code>repeated .ExtList ext = 5;</code>
     */
    public ExtList.Builder addExtBuilder() {
      return getExtFieldBuilder().addBuilder(
          ExtList.getDefaultInstance());
    }
    /**
     * <code>repeated .ExtList ext = 5;</code>
     */
    public ExtList.Builder addExtBuilder(
        int index) {
      return getExtFieldBuilder().addBuilder(
          index, ExtList.getDefaultInstance());
    }
    /**
     * <code>repeated .ExtList ext = 5;</code>
     */
    public java.util.List<ExtList.Builder>
         getExtBuilderList() {
      return getExtFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        ExtList, ExtList.Builder, ExtListOrBuilder>
        getExtFieldBuilder() {
      if (extBuilder_ == null) {
        extBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            ExtList, ExtList.Builder, ExtListOrBuilder>(
                ext_,
                ((bitField0_ & 0x00000010) != 0),
                getParentForChildren(),
                isClean());
        ext_ = null;
      }
      return extBuilder_;
    }

    private int messageType_ ;
    /**
     * <code>uint32 messageType = 6;</code>
     * @return The messageType.
     */
    @Override
    public int getMessageType() {
      return messageType_;
    }
    /**
     * <code>uint32 messageType = 6;</code>
     * @param value The messageType to set.
     * @return This builder for chaining.
     */
    public Builder setMessageType(int value) {

      messageType_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     * <code>uint32 messageType = 6;</code>
     * @return This builder for chaining.
     */
    public Builder clearMessageType() {
      bitField0_ = (bitField0_ & ~0x00000020);
      messageType_ = 0;
      onChanged();
      return this;
    }

    private Object ticket_ = "";
    /**
     * <code>string ticket = 7;</code>
     * @return The ticket.
     */
    public String getTicket() {
      Object ref = ticket_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        ticket_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string ticket = 7;</code>
     * @return The bytes for ticket.
     */
    public com.google.protobuf.ByteString
        getTicketBytes() {
      Object ref = ticket_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        ticket_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string ticket = 7;</code>
     * @param value The ticket to set.
     * @return This builder for chaining.
     */
    public Builder setTicket(
        String value) {
      if (value == null) { throw new NullPointerException(); }
      ticket_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     * <code>string ticket = 7;</code>
     * @return This builder for chaining.
     */
    public Builder clearTicket() {
      ticket_ = getDefaultInstance().getTicket();
      bitField0_ = (bitField0_ & ~0x00000040);
      onChanged();
      return this;
    }
    /**
     * <code>string ticket = 7;</code>
     * @param value The bytes for ticket to set.
     * @return This builder for chaining.
     */
    public Builder setTicketBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      ticket_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }

    private Object clientMessageId_ = "";
    /**
     * <code>string clientMessageId = 8;</code>
     * @return The clientMessageId.
     */
    public String getClientMessageId() {
      Object ref = clientMessageId_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        clientMessageId_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string clientMessageId = 8;</code>
     * @return The bytes for clientMessageId.
     */
    public com.google.protobuf.ByteString
        getClientMessageIdBytes() {
      Object ref = clientMessageId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        clientMessageId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string clientMessageId = 8;</code>
     * @param value The clientMessageId to set.
     * @return This builder for chaining.
     */
    public Builder setClientMessageId(
        String value) {
      if (value == null) { throw new NullPointerException(); }
      clientMessageId_ = value;
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     * <code>string clientMessageId = 8;</code>
     * @return This builder for chaining.
     */
    public Builder clearClientMessageId() {
      clientMessageId_ = getDefaultInstance().getClientMessageId();
      bitField0_ = (bitField0_ & ~0x00000080);
      onChanged();
      return this;
    }
    /**
     * <code>string clientMessageId = 8;</code>
     * @param value The bytes for clientMessageId to set.
     * @return This builder for chaining.
     */
    public Builder setClientMessageIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      clientMessageId_ = value;
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    @Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:SendMessageBody)
  }

  // @@protoc_insertion_point(class_scope:SendMessageBody)
  private static final SendMessageBody DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new SendMessageBody();
  }

  public static SendMessageBody getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<SendMessageBody>
      PARSER = new com.google.protobuf.AbstractParser<SendMessageBody>() {
    @Override
    public SendMessageBody parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      Builder builder = newBuilder();
      try {
        builder.mergeFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(builder.buildPartial());
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e)
            .setUnfinishedMessage(builder.buildPartial());
      }
      return builder.buildPartial();
    }
  };

  public static com.google.protobuf.Parser<SendMessageBody> parser() {
    return PARSER;
  }

  @Override
  public com.google.protobuf.Parser<SendMessageBody> getParserForType() {
    return PARSER;
  }

  @Override
  public SendMessageBody getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

